//同意退款
function edit() {
    var juheOrderRefundId = $("#id").val();
    $.ajax({
        cache : true,
        type : "get",
        url : "/order/manage/jhOrder/audit/success",
        data : {
            juheOrderRefundId: juheOrderRefundId
        },
        async : false,
        error : function(request) {
            parent.layer.alert("Connection error");
        },
        success : function(data) {
            if (data.code == 0) {
                parent.layer.msg("操作成功");
                parent.reLoad();
                var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                parent.layer.close(index);
            } else {
                if (data.msg) {
                    parent.layer.alert(data.msg)
                }else {
                    window.location.href = "/";
                }
            }

        }
    });
}

//拒绝退款
function refuse() {
    var juheOrderRefundId = $("#id").val();
    layer.open({
        id: 'refund_refuse',
        type: 2,
        title: '拒绝退款原因',
        maxmin: true,
        shadeClose: false,
        area: ['80%', '80%'],
        content: '/order/manage/juheOrderRefundRefuse?juheOrderRefundId=' + juheOrderRefundId // iframe的url
    });
}